//
//  DFDetailViewController.swift
//  新浪微博
//
//  Created by dafei on 16/5/21.
//  Copyright © 2016年 itheima. All rights reserved.
//

import UIKit

class DFDetailViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "\(navigationController?.childViewControllers.count ?? 0)"

        view.backgroundColor = UIColor.whiteColor()
//        let back = UIBarButtonItem(imageName: "navigationbar_back_withtext", title: "返回", target: self, action: #selector(DFDetailViewController.back))
//        self.navigationItem.leftBarButtonItem = back
        
        //进入多级页面
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Next", style: .Plain, target: self, action: #selector(DFDetailViewController.next))
        
        
    }
    
//    @objc private func back() {
//     
//        navigationController?.popViewControllerAnimated(true)
//        
//    }
    @objc private func next() {
    
    let next = DFDetailViewController()
        navigationController?.pushViewController(next, animated: true)
    
    }
    
    

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    



}
